#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n, a, b;
    cin >> n >> a >> b;
    char binaryString[n];
    cin >> binaryString;
    long long int i = 0;
    for (i = 0; i < n; i++) {
      if (binaryString[i] == '1') {
        break;
      }
    }
    long long int j;
    for (j = n - 1; j >= 0; j--) {
      if (binaryString[j] == '1') {
        break;
      }
    }
    long long int cost;
    if (i == n)
      cout << (n + 1) * b + n * a << endl;
    else {
      cost = (i + n - j - 1) * b + 2 * b * (j - i + 2) + a * n + 2 * a;
      for (long long int k = i; k <= j; k++) {
        long long int m = 0;
        if (binaryString[k] == '0') {
          for (m = 0; m < n && m + k <= j; m++) {
            if (binaryString[m + k] == '1') break;
          }
          k = k + m - 1;
        }
        if (m > 1) {
          cost = min(cost, cost + 2 * a - (m - 1) * b);
        }
      }
      cout << cost << endl;
    }
  }
}
